 <?php
  require_once('inc_admin.php');

  connect();
  //编写sql语句
   $sql = 'select * from category';
 
  $cat_list = fetch_array($sql); 

 ?>
<!doctype html>
<html>
 <head>
  <meta charset="UTF-8">
  <title>添加家具</title>
 </head>
 <body>
  <form method=post action="doadd.php" enctype="multipart/form-data" >
  <table  align="center" border="1">
  <tr>
  <td>家具名称</td>   
  <td><input type="text" name="zqy_name" required>  </td>
  </tr>
  <tr>
  <th>所属类别</th>
  <td>
    <select name="zqy_cid">
      <option>==请选择==</option>
      <!-- <option value="1">熊猫</option> -->
      <?php
        foreach($cat_list as $one)
        {
          echo '<option value="'.$one['zqy_cid'].'">'.$one['zqy_cname'].'</option>';
        }
      ?>
    </select>
  </td>
</tr>

  <tr>
  <td>家具品牌</td> 
  <td>
  <input type="text" name="zqy_brand">
  </td>
  </tr>
  <tr>
  <td>上传照片</td>   
  <td><input type="file" name="zqy_jiajulink">
  </td>
  </tr>  
  <tr>
  <td>家具介绍</td>   
  <td>
  <input type="text" name="zqy_intro">
  </td>
  </tr>
  <tr>
  <td>上传时间</td>   
  <td>
  <input type="date" name="zqy_adddate">
  </td>
  </tr>

  <tr>
  <td colspan="2">
  <input type="submit" value="提交">
    <input type="reset" value="重置">
  </td>
  </tr>
 </table>
 </form>
 </body>
</html>